<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>客户修改 </title>
    <base target="_self" />
    <link href="../Styles/css.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/ts_css.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
    <script src="../Scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        $(function () {
            if ($("#btnSubmit").val() == "提交") {
                if ($("#hidorganizationId").val() == "0") {
                    alert("请选择要添加的部门;window.close()");
                    return false;
                }
            }
          

        });
        function page_Close() {
            if (window.parent != null) {
                window.parent.close();
            }
            else {
                window.close();
            }
        }
    </script>
</head>
<body>
    <form action="update_customer.do" method="post">

    <div style="background: #EFF3FF; width: 22%; float: left; overflow-y: auto;">
        <div id="tree" class="tree" style="background: #EFF3FF;">
        </div>
    </div>
    <div style="width: 75%; float: left; border: 0px solid #82AFE8">
        <table width="100%">
            <tr>
                <td width="6%">
                    客户姓名：
                </td>
                <td width="13%">
                	<input type="hidden" name="customerId" value="${ customerById.customerId }" />
                    <input name="customerName" type="text" value="${ customerById.customerName }" id="customerName" style="width:95%;" />
                </td>
                <td width="7%">
                    性别：
                </td>
                <td width="13%">
                	<c:if test="${ customerById.sex == '男' }">
                   	 男<input name="sex" type="radio" id="sex"  value="男" checked="checked"/>
                   	 女<input name="sex" type="radio" id="sex"  value="女"/>
                   	 </c:if>
                   	 
                   	 <c:if test="${ customerById.sex == '女' }">
                   	 男<input name="sex" type="radio" id="sex"  value="男"/>
                   	 女<input name="sex" type="radio" id="sex"  value="女" checked="checked" />
                   	 </c:if>
                </td>
            
                <td width="7%">
                    电话：
                </td>
                <td width="13%">
                    <input name="tel" type="text" id="tel" value="${ customerById.tel }" style="width:95%;" />
                </td>
                <!-- <td width="13%">
                    <input style="border-style: none; border-color: inherit; border-width: 0px; background-image: url('Images/search.gif'); width: 100px; height: 24px;" 
                        type="button" value="  " />
                </td> 
                <td width="5%">
                    <input type="button" id="btnAdd" class="button" style="float: right" value="添加" />
                </td>
                -->
            </tr>
            
            <tr>
                <td width="6%">
                    购房类型：
                </td>
                <td width="13%">
                    <input name="describel" type="text" id="describel" value="${ customerById.describel }" style="width:95%;" />
                </td>
                <td width="7%">
                    客户类型：
                </td>
               
                <td width="13%">
                 <c:if test="${customerById.customerType == '个人' }">
                   	 个人<input name="customerType" type="radio" id="customerType"  value="个人" checked="checked"/>
                   	 公司<input name="customerType" type="radio" id="customerType"  value="公司"/>
            	</c:if>
            	 <c:if test="${customerById.customerType == '公司' }">
                   	 个人<input name="customerType" type="radio" id="customerType"  value="个人" />
                   	 公司<input name="customerType" type="radio" id="customerType"  value="公司" checked="checked" />
            	</c:if>
                </td>
                <td width="7%">
                    地址：
                </td>
                <td width="13%">
                    <input name="address" type="text" id="address" value="${ customerById.address }" style="width:95%;" />
                </td>
                <!-- <td width="13%">
                    <input style="border-style: none; border-color: inherit; border-width: 0px; background-image: url('Images/search.gif'); width: 100px; height: 24px;" 
                        type="button" value="  " />
                </td> -->
               
            </tr>
            
          <tr>
            	<td width="7%">
                    婚姻状况：
                </td>
                <td width="13%">
                <c:if test="${ customerById.maritalStatus == '已婚' }">
                  	  已婚<input name="maritalStatus" type="radio" id="maritalStatus"  value="已婚" checked="checked"/>
                   	  未婚<input name="maritalStatus" type="radio" id="maritalStatus"  value="未婚"/>
                </c:if>
                <c:if test="${ customerById.maritalStatus == '未婚' }">
                  	  已婚<input name="maritalStatus" type="radio" id="maritalStatus"  value="已婚"/>
                   	  未婚<input name="maritalStatus" type="radio" id="maritalStatus"  value="未婚" checked="checked" />
                </c:if>
                </td>
            </tr> 
            
            <tr align="center">
               <td width="5%" colspan="6">
                    <input type="submit" style="float: right" value="修改" />
               </td>
            </tr>
        </table>
</form>
</body>
</html>
